-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set vttablet init container resource limits #216
Merged
deepthi
merged 4 commits into
planetscale:main
from
brandt:vttablet-init-container-resource-limits
Sep 14, 2021
Merged
Set vttablet init container resource limits #216
deepthi
merged 4 commits into
planetscale:main
from
brandt:vttablet-init-container-resource-limits
Sep 14, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: J. Brandt Buckley <brandt@runlevel1.com>
Signed-off-by: J. Brandt Buckley <brandt@runlevel1.com>
Signed-off-by: J. Brandt Buckley <brandt@runlevel1.com>
dctrwatson
approved these changes
Jul 29, 2021
deepthi
pushed a commit
that referenced
this pull request
Jan 31, 2022
brandt
added a commit
to brandt/vitess-operator
that referenced
this pull request
Mar 6, 2022
Sets the resource requirements on each of the default vttablet init containers to the same request and limit values as the vttablet container itself. This fixes the issue reported in planetscale#212 where pods would fail to be created on clusters with strict quota requirements because no limit was set on the init containers. ## History This is a reimplementation of planetscale#216 with the change that it no longer sets a default resource _limit_. This fixes the issue reported in planetscale#240 and discussed in planetscale#244 where the vttablet pod would fail to be created when the user sets a request larger than the default limit without also setting a larger limit. The user's nil limit would not override the default value because `update.ResourceRequirements(dst, src)` won't update `dst` with a nil `src` ([for good reasons](https://github.com/planetscale/vitess-operator/blob/da7efd4c945193864f5996cb793055449c4de97a/pkg/operator/update/podspec.go#L201-L203)). With this change, users can once again increase the request by itself. If a cluster requires a limit, the user will already need to have set it on for vttablet so we can use the same value to override the init containers' default nil limit. fixes planetscale#212 fixes planetscale#240 Signed-off-by: J. Brandt Buckley <brandt@runlevel1.com>
GuptaManan100
pushed a commit
that referenced
this pull request
Feb 2, 2023
Sets the resource requirements on each of the default vttablet init containers to the same request and limit values as the vttablet container itself. This fixes the issue reported in #212 where pods would fail to be created on clusters with strict quota requirements because no limit was set on the init containers. ## History This is a reimplementation of #216 with the change that it no longer sets a default resource _limit_. This fixes the issue reported in #240 and discussed in #244 where the vttablet pod would fail to be created when the user sets a request larger than the default limit without also setting a larger limit. The user's nil limit would not override the default value because `update.ResourceRequirements(dst, src)` won't update `dst` with a nil `src` ([for good reasons](https://github.com/planetscale/vitess-operator/blob/da7efd4c945193864f5996cb793055449c4de97a/pkg/operator/update/podspec.go#L201-L203)). With this change, users can once again increase the request by itself. If a cluster requires a limit, the user will already need to have set it on for vttablet so we can use the same value to override the init containers' default nil limit. fixes #212 fixes #240 Signed-off-by: J. Brandt Buckley <brandt@runlevel1.com>
GuptaManan100
added a commit
that referenced
this pull request
Feb 2, 2023
* Set vttablet init container resource requests and limits Sets the resource requirements on each of the default vttablet init containers to the same request and limit values as the vttablet container itself. This fixes the issue reported in #212 where pods would fail to be created on clusters with strict quota requirements because no limit was set on the init containers. ## History This is a reimplementation of #216 with the change that it no longer sets a default resource _limit_. This fixes the issue reported in #240 and discussed in #244 where the vttablet pod would fail to be created when the user sets a request larger than the default limit without also setting a larger limit. The user's nil limit would not override the default value because `update.ResourceRequirements(dst, src)` won't update `dst` with a nil `src` ([for good reasons](https://github.com/planetscale/vitess-operator/blob/da7efd4c945193864f5996cb793055449c4de97a/pkg/operator/update/podspec.go#L201-L203)). With this change, users can once again increase the request by itself. If a cluster requires a limit, the user will already need to have set it on for vttablet so we can use the same value to override the init containers' default nil limit. fixes #212 fixes #240 Signed-off-by: J. Brandt Buckley <brandt@runlevel1.com> * refactor: move defaults to the correct location Signed-off-by: Manan Gupta <manan@planetscale.com> --------- Signed-off-by: J. Brandt Buckley <brandt@runlevel1.com> Signed-off-by: Manan Gupta <manan@planetscale.com> Co-authored-by: J. Brandt Buckley <brandt@runlevel1.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Sets the resource requirements on each of the default vttablet init containers to the same values as the vttablet container itself in case cluster quota requirements mandate they be set. Given the same values, it shouldn't impact scheduling.
fixes #212